package cn.webrx.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Set;

@Component
@Scope("prototype")
@Data
public class Teacher {
    //@Value("1")
    private int id;
    //@Value("赵老师")
    private String name;



    @Value("#{'a,b,c,c,c,c,f'.split(',')}")
    private String[] books;
    //private List<String> books;
    //private Set<String> books;


    private User user;

    public Teacher(){
        System.out.println("Teacher()");
    }

    public Teacher(int id,String name){
        this.id = id;
        this.name = name;
        System.out.println("Teacher(int id,String name)");

    }

    public void start(){
        System.out.println("start()");
    }
    public void end(){
        System.out.println("end()");
    }

}
